<?php TPL::output('admin/global/header.tpl.htm'); ?>

<!--left-->
<?php TPL::output('admin/global/left.tpl.htm'); ?>
<!--left-->

<!-- main -->
<div id="main-content">
	<div class="clear"></div>
	<div class="content-box">
		<div class="content-box-header">
			<h3><?php echo $this->crumb['last']['name']; ?></h3>
			<ul class="content-box-tabs">
				<li><a href="#tab1" class="default-tab current">编辑专题</a></li>
				<li><a href="admin/feature/list/" class="">专题列表</a></li>
				<li><a href="#tab2">添加专题</a></li>
			</ul>
			<div class="clear"></div>
		</div>
		<div class="content-box-content">
			<div class="tab-content default-tab" id="tab1">
				<form id="_save_form" action="admin/feature/save_ajax/feature_id-<?php echo $this->feature['id']; ?>" method="post">
					<p>
						<label>专题标题：</label>
						<input type="text" value="<?php echo $this->feature['title']; ?>" class="text-input medium-input" name="title">
					</p>
					<p>
						<label>别名：</label>
						<?php echo get_js_url('/'); ?>feature/ <input type="text" name="url_token" class="text-input" style="width:120px;" value="<?php echo $this->feature['url_token']; ?>">
					</p>
					<p>
						<label>专题描述：</label>
						<input id="description" type="text" value="<?php echo $this->feature['description']; ?>" class="text-input medium-input" name="description">
					</p>
					<p>
						<label>专题图标(规格：900x240px)：</label>
						<?php if($this->feature['icon']){ ?>
					<div style="width:900px; height:240px;background:url(<?php echo get_feature_pic_url('max', $this->feature['icon']); ?>) no-repeat;"></div>
					<?php } ?>
					修改图标：
					<input name="icon" class="upload-input" type="file" style="margin-top:10px;">
					<br />
					<small>(支持上传图片类型：jpg,jpeg,gif,png)</small>
					</p>
					</label>
					</p>
					<p>
						<label>自定义页面样式(CSS)：</label>
						<textarea id="css" rows="3" cols="100" name="css"><?php echo $this->feature['css']; ?></textarea>
						<br />
						<small> 不需要写&lt;style&gt;标签 </small>
					</p>
					<p>
						<input class="button" type="button" onClick="ajax_post($('#_save_form'), _form_process);" value="保   存" />
					</p>
					</label>
					</p>
				</form>
			</div>
			<div class="tab-content" id="tab2" style="display: none;">
				<h3>添加专题</h3>
				<form id="_add_form" action="admin/feature/save_ajax/" method="post">
					<p>
						<label>专题标题：</label>
						<input type="text" value="" class="text-input medium-input" name="title">
					</p>
					<p>
						<label>别名：</label>
						<?php echo get_js_url('/'); ?>feature/ <input type="text" name="url_token" class="text-input" style="width:120px;" value="<?php echo $this->feature['url_token']; ?>">
					</p>
					<p>
						<label>专题描述：</label>
						<input id="description" type="text" value="" class="text-input medium-input" name="description">
					</p>
					<p>
						<label>专题图标：</label>
						<input name="icon" class="upload-input" type="file">
						<br />
						<small>(支持上传图片类型：jpg,jpeg,gif,png)</small> </p>
					<p>
						<label>自定义页面样式(CSS)：</label>
						<textarea id="description" rows="3" cols="100" name="description"><?php echo $this->feature['css']; ?></textarea>
						<br />
						<small> 不需要写&lt;style&gt;标签 </small>
					</p>
					<p>
						<input class="button" type="button" onClick="ajax_post($('#_add_form'), _form_process);" value="添加新专题" />
					</p>
					</label>
					</p>
				</form>
			</div>
		</div>
	</div>

<!-- footer -->
<?php TPL::output('admin/global/footer.tpl.htm'); ?>
<!-- footer -->

</div>
<!-- main -->

</div>

</body>
</html>